package com.wza.designPattern.PrototypePattern;

/**
 * <一句话功能简述>
 * <p>
 * <功能详细描述>
 *
 * @author weizhian
 * @version [版本号, 2018/11/20]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
public abstract class Shape implements Cloneable
{
    private String id;
    protected String type;

    abstract void draw();

    public String getId()
    {
        return id;
    }

    public void setId(String id)
    {
        this.id = id;
    }

    public String getType()
    {
        return type;
    }

    public void setType(String type)
    {
        this.type = type;
    }

    @Override
    public Object clone()
    {
        Object clone = null;

        try
        {
            clone = super.clone();
        }
        catch (CloneNotSupportedException e)
        {
            e.printStackTrace();
        }

        return clone;
    }
}
